package com.crm.model.mdao;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import com.crm.model.mpojo.Orderinfo;

@Mapper
public interface OrderInfoMapper {
	/**
	 * 订单展示页面的数据
	 * @return
	 */
	public List<Map<String, String>> selectAll();
	public List<Map<String, String>> selectAlls(@Param("salesreturn") Integer salesreturn,@Param("dstatus")Integer dstatus,@Param("theme")String theme);
	/**
	 * 根据ID查询订单信息
	 * @return
	 */
	public Map<String, String> selectAllOrderByid(@Param("x") Integer x);
	
	/**
	 * 客户ID查订单用于前台展示
	 * @return
	 */
	public List<Map<String, String>> selectAllBypageID(@Param("x") Integer x);
	
	//获取当然订单数
	int selectOrderNum();
	
	//客户id查询订单信息
	public List<Map<String, String>> selectAllBycustIDTwo(@Param("x") Integer x);
	
	public List<Map<String, String>> selectAllBycustID(@Param("x") Integer x);
	
	public Map<String, String> selectAllView(@Param("x") Integer x);
	
	 int deleteByPrimaryKey(Integer oId);

	    int insert(Orderinfo record);

	    int insertSelective(Orderinfo record);

	    Orderinfo selectByPrimaryKey(Integer oId);

	    int updateByPrimaryKeySelective(Orderinfo record);

	    int updateByPrimaryKeyWithBLOBs(Orderinfo record);

	    int updateByPrimaryKey(Orderinfo record);
	  
	  //根据客户id查询订单
	 List<Map<String, String>> selectCustid(@Param("custid") Integer custid);
	
}
